<?php

class questionaireComponents extends sfComponents {

    public function executeTabs() {

        $this->tabs = array('Information' =>
            array('route' => '@questionaire_edit?id=' . $this->getRequestParameter('id'),
                'action' => 'edit',
                'selected' => $this->getRequestParameter('action') == 'edit'),
            'Questions' =>
            array('route' => '@admin_page?module=questionaire&action=questions&id=' . $this->getRequestParameter('id'),
                'action' => 'questions',
                'selected' => $this->getRequestParameter('action') == 'questions'),
            'Answers' =>
            array('route' => '@admin_page?module=questionaire&action=answers&id=' . $this->getRequestParameter('id'),
                'action' => 'answers',
                'selected' => $this->getRequestParameter('action') == 'answers'),
            'Results' =>
            array('route' => '@admin_page?module=questionaire&action=results&id=' . $this->getRequestParameter('id'),
                'action' => 'results',
                'selected' => $this->getRequestParameter('action') == 'results'),
            'Export' =>
            array('route' => '@admin_page?module=questionaire&action=export&id=' . $this->getRequestParameter('id'),
                'action' => 'export',
                'selected' => $this->getRequestParameter('action') == 'export'),
        );
    }
    
    
    public function executeFooterTabs($request) {
       $this->id = $request->getParameter('id');
    }

}